//
//  GYMineHelpCenterVC.m
//  GYDemo
//
//  Created by mac on 2018/4/3.
//  Copyright © 2018年 mac. All rights reserved.
//

//
//                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
//            __.'              ~.   .~              `.__
//          .'//                  \./                  \\`.
//        .'//                     |                     \\`.
//      .'// .-~"""""""~~~~-._     |     _,-~~~~"""""""~-. \\`.
//    .'//.-"                 `-.  |  .-'                 "-.\\`.
//  .'//______.============-..   \ | /   ..-============.______\\`.
//.'______________________________\|/______________________________`.
//
//

#import "GYMineHelpCenterVC.h"
#import "Head.h"

@interface GYMineHelpCenterVC ()
@property (nonatomic,strong) UITextView *contentTV;
@end

@implementation GYMineHelpCenterVC
#pragma mark - getter and setter
-(UITextView *)contentTV
{
    if (!_contentTV) {
        _contentTV = [UITextView new];
        _contentTV.x = WFCGFloatX(13);
        _contentTV.width = self.view.width - WFCGFloatX(26);
        _contentTV.height = self.view.height - 64;
        _contentTV.showsVerticalScrollIndicator = NO;
        
        NSString *title_1 = @"1 常见问题";
        NSString *content_1 = @"\n1.1 注册及认证流程\n1.1.1 注册\n打开革优商城app，点击右下角“我的”，进入会员中心，点击右上角“去登录”，进入登录界面，如果您未注册，请点击注册，根据提示完成注册。\n1.1.2 认证\n完成注册之后，您需要认证真实信息才能享受革优商城app更多服务。在认证页面填写相关资料，提交审核通过可成为认证会员；也可选择以后完善。（注：公司注册需提供企业法人身份证号和身份证照片，以及营业执照照片）\n1.2 忘记密码\n进入登录页面，点击忘记密码，进入密码找回页面。输入您注册时使用的手机号，根据提示填写短信验证码和验证码，即可进行密码重置。\n\n";
        NSString * title_2 = @"2 我要买";
        NSString *content_2 = @"\n2.1 如何获得产品信息\n作为买家，可以通过两种方式查询产品：自己找货和发布求购信息\n2.1.1 如何自己找货\n登录革优商城app首页，找到现货资源，进入现货资源查询列表（认证用户可查询详细产品信息），系统会根据用户注册时填写的采购产品种类信息列出相应的现货信息。\n2.1.2 如何发布求购信息\n进入会员中心，选择求购信息列表，点击“新增求购”即可编辑求购信息。编辑完成后保存，新添加的求购信息会出现在求购列表中。如需修改，点击“修改”，可返回编辑求购信息页面。如信息无误，点击“发布”即可。\n\n";
        NSString *title_3 = @"3 我要卖";
        NSString *content_3 = @"\n作为卖家，有两种方式可以在革优商城销售产品：发布产品信息和直接获得求购信息\n3.1 发布产品信息\n进入会员中心，选择产品列表，点击“新增产品”即可编辑产品信息。编辑完成后保存，新添加的产品信息会出现在产品列表中。如需修改，点击“修改”，可返回编辑产品信息页面。如信息无误，点击“发布”即可。\n3.2 直接获得求购信息\n3.2.1 登录革优商城app首页，选择求购信息，系统根据卖家注册时填写的主营品类列出相关求购信息。\n3.2.2 如卖家看中某求购信息，点击即可查看求购详情.";
        
        NSString *protocolStr = [NSString stringWithFormat:@"%@%@%@%@%@%@",title_1, content_1, title_2, content_2, title_3, content_3];
        
        NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc]init];
        paraStyle.lineBreakMode = NSLineBreakByCharWrapping;
        paraStyle.alignment = NSTextAlignmentLeft;
        paraStyle.lineSpacing = 2.0;
        paraStyle.hyphenationFactor = 1.0;
        paraStyle.firstLineHeadIndent = 0.0;
        paraStyle.paragraphSpacingBefore = 0.0;
        paraStyle.headIndent = 0;
        paraStyle.tailIndent = 0;
        
        NSMutableAttributedString *attributeStr = [[NSMutableAttributedString alloc]initWithString:protocolStr];
        [attributeStr addAttribute:NSFontAttributeName value:SYSTEMFONT(15) range:[protocolStr rangeOfString:protocolStr]];
        [attributeStr addAttribute:NSParagraphStyleAttributeName value:paraStyle range:[protocolStr rangeOfString:protocolStr]];
        [attributeStr addAttribute:NSKernAttributeName value:@(1.5) range:[protocolStr rangeOfString:protocolStr]];
        [attributeStr addAttribute:NSFontAttributeName value:SYSTEMFONT(18) range:[protocolStr rangeOfString:title_1]];
        [attributeStr addAttribute:NSFontAttributeName value:SYSTEMFONT(18) range:[protocolStr rangeOfString:title_2]];
        [attributeStr addAttribute:NSFontAttributeName value:SYSTEMFONT(18) range:[protocolStr rangeOfString:title_3]];
        
        _contentTV.attributedText = attributeStr;
    }
    return _contentTV;
}
#pragma mark - event
#pragma mark - method
-(void)initilization
{
    self.navigationItem.title = @"帮助中心";
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.edgesForExtendedLayout = UIRectEdgeNone;
    
    self.navigationController.navigationBar.shadowImage = [[UIImage new]rt_darkenWithLevel:0.3f];
    [self setNavgationTheme:1];
    self.view.backgroundColor = Main_Color_White;
    //
    [self.view addSubview:self.contentTV];
}
#pragma mark - life
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self initilization];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
#pragma mark - delegate
@end


/*
 11111111111111111111111111111111111111001111111111111111111111111
 11111111111111111111111111111111111100011111111111111111111111111
 11111111111111111111111111111111100001111111111111111111111111111
 11111111111111111111111111111110000111111111111111111111111111111
 11111111111111111111111111111000000111111111111111111111111111111
 11111111111111111111111111100000011110001100000000000000011111111
 11111111111111111100000000000000000000000000000000011111111111111
 11111111111111110111000000000000000000000000000011111111111111111
 11111111111111111111111000000000000000000000000000000000111111111
 11111111111111111110000000000000000000000000000000111111111111111
 11111111111111111100011100000000000000000000000000000111111111111
 11111111111111100000110000000000011000000000000000000011111111111
 11111111111111000000000000000100111100000000000001100000111111111
 11111111110000000000000000001110111110000000000000111000011111111
 11111111000000000000000000011111111100000000000000011110001111111
 11111110000000011111111111111111111100000000000000001111100111111
 11111111000001111111111111111111110000000000000000001111111111111
 11111111110111111111111111111100000000000000000000000111111111111
 11111111111111110000000000000000000000000000000000000111111111111
 11111111111111111100000000000000000000000000001100000111111111111
 11111111111111000000000000000000000000000000111100000111111111111
 11111111111000000000000000000000000000000001111110000111111111111
 11111111100000000000000000000000000000001111111110000111111111111
 11111110000000000000000000000000000000111111111110000111111111111
 11111100000000000000000001110000001111111111111110001111111111111
 11111000000000000000011111111111111111111111111110011111111111111
 11110000000000000001111111111111111100111111111111111111111111111
 11100000000000000011111111111111111111100001111111111111111111111
 11100000000001000111111111111111111111111000001111111111111111111
 11000000000001100111111111111111111111111110000000111111111111111
 11000000000000111011111111111100011111000011100000001111111111111
 11000000000000011111111111111111000111110000000000000011111111111
 11000000000000000011111111111111000000000000000000000000111111111
 11001000000000000000001111111110000000000000000000000000001111111
 11100110000000000001111111110000000000000000111000000000000111111
 11110110000000000000000000000000000000000111111111110000000011111
 11111110000000000000000000000000000000001111111111111100000001111
 11111110000010000000000000000001100000000111011111111110000001111
 11111111000111110000000000000111110000000000111111111110110000111
 11111110001111111100010000000001111100000111111111111111110000111
 11111110001111111111111110000000111111100000000111111111111000111
 11111111001111111111111111111000000111111111111111111111111100011
 11111111101111111111111111111110000111111111111111111111111001111
 11111111111111111111111111111110001111111111111111111111100111111
 11111111111111111111111111111111001111111111111111111111001111111
 11111111111111111111111111111111100111111111111111111111111111111
 11111111111111111111111111111111110111111111111111111111111111111
 
 
 */
